package com.cmc.cloud.cmclink.doc.api.document.rep;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.util.Date;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * @author lzp
 * @date 2025/10/27 17:06
 * @description
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BlnoWebInfoRespDto {

    @Schema(description = "提单id")
    private Long id;

    @Schema(description = "订舱号")
    private String bookingNo;

    @Schema(description = "提单号")
    private String blNo;

    @Schema(description = "订舱船名")
    private String bkgVesselCode;

    @Schema(description = "航次号")
    private String bkgVoyage;

    @Schema(description = "接货地")
    private String porCode;

    @Schema(description = "装货港")
    private String polCode;

    @Schema(description = "卸货港")
    private String podCode;

    @Schema(description = "目的地")
    private String delCode;

    @Schema(description = "始发港提单状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1",
            allowableValues = {"SI01(草稿)", "SI02(SI 待审核)", "SI03(SI已确认)", "SI04(待确认 Draft 件)", "SI05(已确认 Draft 件)", "SI06(提单准备好签发)"})
    private String siStatus;

    @Schema(description = "提单拆并单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String splitCombineType;

    @Schema(description = "路径id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20782")
    private Long routeId;

    @Schema(description = "接货地名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String porDesc;

    @Schema(description = "装货港名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String polDesc;

    @Schema(description = "卸货港名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String podDesc;

    @Schema(description = "目的地名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String delDesc;

    @Schema(description = "订舱人代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String bkpCode;

    @Schema(description = "舱位代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String spaceOwner;

    @Schema(description = "箱主代码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String cntrOwner;

    @Schema(description = "箱状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String cntrStatus;

    @Schema(description = "协议号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String agreementNo;

    @Schema(description = "运输条款", requiredMode = Schema.RequiredMode.REQUIRED)
    private String shippingTerm;

    @Schema(description = "一代代码")
    private String topAgentCode;

    @Schema(description = "提单主体代码")
    private String blEntity;

    @Schema(description = "提单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String blType;

    @Schema(description = "提单打印地")
    private String issuePlace;

    @Schema(description = "提单打印份数", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer printBlNumber;

    @Schema(description = "签单日期")
    private LocalDate issueDate;

    @Schema(description = "签发小船提单")
    private Boolean issueFeederBl;

    @Schema(description = "签发小船装港")
    private Boolean issueFeederPlace;

    @Schema(description = "客户要求签单类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private String signOrder;

    @Schema(description = "实际签单类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private String signType;

    @Schema(description = "锁单标识")
    private Boolean blLockFlag;

    @Schema(description = "D/O状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private String doStatus;

    @Schema(description = "数据来源")
    private String datasource;

    @Schema(description = "si通知邮箱 （收，可多）")
    private String siNotifyEmails;

    @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
    private String creator;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @Schema(description = "换单日期")
    private String doDate;

    @Schema(description = "扣单标识")
    private Boolean restrictionFlag;

    @Schema(description = "电子保函登记类型")
    private String elgReceive;

    @Schema(description = "正本保函登记类型")
    private String lgReceive;
}
